<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <style type="text/css">
        li{
             list-style :none;
        }
    </style>
</head>

<body>
    <div id="id_json">
        {"Count":1,"Data":[{"_id":"57fe151de51ca06ed8982ce0","APPName":"123","AppID":123,"AppImages":["123","123"]}]}
    </div>
    <ul>
        <li>{</li>
        <li>"Count":1,</li>
        <li>"Data":</li>
        <ul>
            <li>[</li>
            <ul>
                <li>{</li>
                <li>"_id":"57fe151de51ca06ed8982ce0",</li>
                <li>"APPName":"123",</li>
                <li>"AppID":123,</li>
                <li>"AppImages":</li>
                <ul>
                    <li>[</li>
                    <li>"123",</li>
                    <li>"123"</li>
                    <li>]</li>
                </ul>
                <li>}</li>
            </ul>
            <li>]</li>
        </ul>
        <li>}</li>
    </ul>
    <script type="text/javascript">
        function FormatJson(doc){
            var lastChar = '';
            var isStr = false;
            var nodes = {"text":"","child":[]};
            var text = "";
            var tc = "{}[]";
            var html = "";
            for (i = 0; i < doc.length; i++){                
                if(!isStr && (doc[i] == "[" || doc[i] == "]" || doc[i] == "{" || doc[i] == "}")){
                    if(text != ""){
                        console.log(text);
                        html += ("<li>"+text+"</li>");
                        text = "";
                    }
                    if (doc[i] == "[" || doc[i] == "{"){
                        html += ("<ul><li>"+doc[i]+"</li>");
                    }else if(doc[i] == "]" || doc[i] == "}"){
                        html += ("<li>"+doc[i]+"</li></ul>");
                    }
                    console.log(doc[i]);
                }else if(doc[i] == "\"" && lastChar != "\\"){
                    text += doc[i];
                    isStr = !isStr;                    
                }else if(doc[i] == "," && !isStr){
                    text += doc[i];
                    console.log(text);
                    html += ("<li>"+text+"</li>");
                    text = "";
                }else {
                     text += doc[i];
                }
                lastChar = doc[i];
            }
            console.log(html);
            //end   
        }
        var doc1 = document.getElementById("id_json").innerText;
        console.log(doc1);
        console.log(doc1.length);    
        FormatJson(doc1);
        </script>
</body>

</html>